package com.haixiaoke.saas.enterprise.department.controller;

import com.haixiaoke.saas.common.annotation.TenantScope;
import com.haixiaoke.saas.common.core.page.TableDataInfo;
import com.haixiaoke.saas.common.tenant.TenantContext;
import com.haixiaoke.saas.department.domain.ElectronicVisaRecord;
import com.haixiaoke.saas.department.service.IElectronicVisaRecordService;
import com.haixiaoke.saas.system.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 企业电子合同数量操作记录Controller
 * 
 * @author panda
 * @date 2024-05-29
 */
@RestController
@RequestMapping("/enterprise/department/electronicVisaRecord")
public class EnterpriseElectronicVisaRecordController extends BaseController {
    @Autowired
    private IElectronicVisaRecordService electronicVisaRecordService;

    /**
     * 查询企业电子合同数量操作记录列表
     */
//    @PreAuthorize("@ss.hasPermi('enterprise:electronicVisa:list')")
    @GetMapping("/list")
    @TenantScope
    public TableDataInfo list(ElectronicVisaRecord electronicVisaRecord) {
        startPage();
        electronicVisaRecord.setTenantId(TenantContext.getTenantId());
        List<ElectronicVisaRecord> list = electronicVisaRecordService.selectElectronicVisaRecordList(electronicVisaRecord);
        return getDataTable(list);
    }
}
